<%@ page import="java.util.*" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查看课程详情</title>
<script language="javascript" type="text/javascript">
	function dis(){
		var div1=document.getElementById("div1");
		var div2=document.getElementById("div2");
		div1.style.display="none";
		div2.style.display="inherit";
	}
</script>
</head>

<body>
<div id="div1" style="display:inherit"> 
 课程名称：${course.cname }<br/>
 课程图片：<img src="..${course.cpic }" /><br/>
 <input type="button" onclick="dis()" value="编辑" />&nbsp;<input type="button" value="返回" onclick="history.back()"/>
 </div>
  <div style="display:none" id="div2">
 	<form action="updateCourse" method="post" enctype="multipart/form-data">
 	<input type="hidden" name="course.CId" value="${course.cid }" />
    	课程名称：<input type="text" value="${course.cname}" name="course.CName" /><br />
        课程图片：<img src="..${course.cpic }" /><br/>
        <input type="file"  name="img" accept="jpg, gif, png" value="<%=basePath %>${course.cpic }" /><br />
        <input type="submit" value="提交" />&nbsp;<input type="button" value="返回" onclick="history.back()"/>
    </form>
 </div>
</body>
</html>
